<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">



    <h:body>
        <ui:composition template="templateGeneral.xhtml">
            <ui:define name="title">Zaposleni</ui:define>
            <ui:define name="center">

                <h:form id="form">

                    <p:tabView id="tabView" dynamic="false" style=" margin-top: 10px" orientation="left" effect="slide">  

                        <p:ajax event="tabChange" listener="#{tableZaposleni.onTabChange}" update=":form:tabView"/>  	


                        <p:tab title="Redovni profesori" id="redProf"> 
                            <p:tabView id="redPr" orientation="left" effect="blind">
                                <c:forEach items="#{tableZaposleni.redovniProfesori}" var="zap" >
                                    <p:tab title="#{zap.korisnik.ime} #{zap.korisnik.prezime}">
                                        <h:panelGrid  columns="2" cellpadding="4">  

                                            <f:facet name="header">  
                                                <p:graphicImage value="/resources/images/ff.jpg"/>  
                                            </f:facet>  

                                            <h:outputText value="Ime" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.korisnik.ime}" />

                                            <h:outputText value="Prezime"  style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.korisnik.prezime}" />

                                            <h:outputText value="Zvanje" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.zvanje}" />

                                            <h:outputText value="Kabinet" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.kabinet}" />  

                                            <h:outputText value="Telefon" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.telefon}" />  

                                            <h:outputText value="Email" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.mail}" />  

                                            <h:outputText value="Adresa" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.adresa}" />  

                                            <h:outputText value="Sajt" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.web}" />

                                            <h:outputText value="Prima" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.prijem}" />

                                            <h:outputText value="Datum isteka ugovora" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.istekUgovora}" />

                                            <h:outputText value="Status" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.status}" />

                                            <h:outputText value="Biografija" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.cv}" />


                                        </h:panelGrid>
                                        <p:fieldset legend="Predmeti"  toggleable="true" toggleSpeed="500" collapsed="true" >
                                            <p:ajax event="toggle" listener="#{tableZaposleni.loadPredmeti(zap)}" /> 
                                            <c:forEach items="#{tableZaposleni.predmetList}" var="pred">
                                                <h:panelGrid columns="2" cellpadding="10">
                                                    <h:outputText value="#{pred.naziv}"/>
                                                    <p:commandButton icon="ui-icon-circle-plus" action="#{predmetInfo.loadPredmet(pred.sifra)}"/>
                                                </h:panelGrid>
                                            </c:forEach>
                                        </p:fieldset>
                                    </p:tab>
                                </c:forEach>

                            </p:tabView>
                        </p:tab>

                        <p:tab title="Vandredni profesori" id="vandrProf"> 
                            <p:tabView id="vandrPr" dynamic="true" orientation="left" effect="blind">
                                <c:forEach items="#{tableZaposleni.vandredniProfesori}" var="zap">
                                    <p:tab title="#{zap.korisnik.ime} #{zap.korisnik.prezime}">
                                        <h:panelGrid columns="2" cellpadding="4">  

                                            <f:facet name="header">  
                                                <p:graphicImage value="/resources/images/ff.jpg"/>  
                                            </f:facet>  

                                            <h:outputText value="Ime" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.korisnik.ime}" />

                                            <h:outputText value="Prezime"  style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.korisnik.prezime}" />

                                            <h:outputText value="Zvanje" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.zvanje}" />

                                            <h:outputText value="Kabinet" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.kabinet}" />  

                                            <h:outputText value="Telefon" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.telefon}" />  

                                            <h:outputText value="Email" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.mail}" />  

                                            <h:outputText value="Adresa" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.adresa}" />  

                                            <h:outputText value="Sajt" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.web}" />

                                            <h:outputText value="Prima" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.prijem}" />

                                            <h:outputText value="Datum isteka ugovora" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.istekUgovora}" />

                                            <h:outputText value="Status" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.status}" />

                                            <h:outputText value="Biografija" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.cv}" />


                                        </h:panelGrid>
                                        <p:fieldset legend="Predmeti"  toggleable="true" toggleSpeed="500" collapsed="true" >
                                            <p:ajax event="toggle" listener="#{tableZaposleni.loadPredmeti(zap)}" />
                                            <c:forEach items="#{tableZaposleni.predmetList}" var="pred">
                                                <h:panelGrid columns="2" cellpadding="10">
                                                    <h:outputText value="#{pred.naziv}"/>
                                                    <p:commandButton icon="ui-icon-circle-plus" action="#{predmetInfo.loadPredmet(pred.sifra)}"/>
                                                </h:panelGrid>
                                            </c:forEach>
                                        </p:fieldset>
                                    </p:tab>
                                </c:forEach>
                            </p:tabView>
                        </p:tab>

                        <p:tab title="Docenti" id="docenti"> 
                            <p:tabView id="doc" dynamic="true" orientation="left" effect="blind">
                                <c:forEach items="#{tableZaposleni.docenti}" var="zap">
                                    <p:tab title="#{zap.korisnik.ime} #{zap.korisnik.prezime}">
                                        <h:panelGrid  columns="2" cellpadding="4">  

                                            <f:facet name="header">  
                                                <p:graphicImage value="/resources/images/ff.jpg"/>  
                                            </f:facet>  

                                            <h:outputText value="Ime" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.korisnik.ime}" />

                                            <h:outputText value="Prezime"  style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.korisnik.prezime}" />

                                            <h:outputText value="Zvanje" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.zvanje}" />

                                            <h:outputText value="Kabinet" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.kabinet}" />  

                                            <h:outputText value="Telefon" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.telefon}" />  

                                            <h:outputText value="Email" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.mail}" />  

                                            <h:outputText value="Adresa" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.adresa}" />  

                                            <h:outputText value="Sajt" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.web}" />

                                            <h:outputText value="Prima" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.prijem}" />

                                            <h:outputText value="Datum isteka ugovora" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.istekUgovora}" />

                                            <h:outputText value="Status" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.status}" />

                                            <h:outputText value="Biografija" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.cv}" />


                                        </h:panelGrid>
                                        <p:fieldset legend="Predmeti" toggleable="true" toggleSpeed="500" collapsed="true" >
                                            <p:ajax event="toggle" listener="#{tableZaposleni.loadPredmeti(zap)}" />
                                            <c:forEach items="#{tableZaposleni.predmetList}" var="pred">
                                                <h:panelGrid columns="2" cellpadding="10">
                                                    <h:outputText value="#{pred.naziv}"/>
                                                    <p:commandButton icon="ui-icon-circle-plus" action="#{predmetInfo.loadPredmet(pred.sifra)}"/>
                                                </h:panelGrid>
                                            </c:forEach>
                                        </p:fieldset>
                                    </p:tab>
                                </c:forEach>
                            </p:tabView>
                        </p:tab>

                        <p:tab title="Asistenti" id="asistenti" > 
                            <p:tabView id="asistent" dynamic="true" orientation="left" effect="blind">

                                <h:outputText value="#{zap.korisnik.ime}"/>
                                <c:forEach items="#{tableZaposleni.asistenti}" var="zap">
                                    <p:tab title="#{zap.korisnik.ime} #{zap.korisnik.prezime}">
                                        <h:panelGrid  columns="2" cellpadding="4">  

                                            <f:facet name="header">  
                                                <p:graphicImage value="/resources/images/ff.jpg"/>  
                                            </f:facet>  

                                            <h:outputText value="Ime" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.korisnik.ime}" />

                                            <h:outputText value="Prezime"  style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.korisnik.prezime}" />

                                            <h:outputText value="Zvanje" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.zvanje}" />

                                            <h:outputText value="Kabinet" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.kabinet}" />  

                                            <h:outputText value="Telefon" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.telefon}" />  

                                            <h:outputText value="Email" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.mail}" />  

                                            <h:outputText value="Adresa" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.adresa}" />  

                                            <h:outputText value="Sajt" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.web}" />

                                            <h:outputText value="Prima" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.prijem}" />

                                            <h:outputText value="Datum isteka ugovora" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.istekUgovora}" />

                                            <h:outputText value="Status" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.status}" />

                                            <h:outputText value="Biografija" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.cv}" />


                                        </h:panelGrid>
                                        <p:fieldset legend="Predmeti" toggleable="true" toggleSpeed="500" collapsed="true" >
                                            <p:ajax event="toggle" listener="#{tableZaposleni.loadPredmeti(zap)}" />
                                            <c:forEach items="#{tableZaposleni.predmetList}" var="pred">
                                                <h:panelGrid columns="2" cellpadding="10">
                                                    <h:outputText value="#{pred.naziv}"/>
                                                    <p:commandButton icon="ui-icon-circle-plus" action="#{predmetInfo.loadPredmet(pred.sifra)}"/>
                                                </h:panelGrid>
                                            </c:forEach>
                                        </p:fieldset>
                                    </p:tab>
                                </c:forEach>
                            </p:tabView>
                        </p:tab>

                        <p:tab title="Saradnici u nastavi" id="sarad" > 
                            <p:tabView id="sar" dynamic="true" orientation="left" effect="blind">
                                <c:forEach items="#{tableZaposleni.saradniciUNastavi}" var="zap">
                                    <p:tab title="#{zap.korisnik.ime} #{zap.korisnik.prezime}">
                                        <h:panelGrid  columns="2" cellpadding="4">  

                                            <f:facet name="header">  
                                                <p:graphicImage value="/resources/images/ff.jpg"/>  
                                            </f:facet>  

                                            <h:outputText value="Ime" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.korisnik.ime}" />

                                            <h:outputText value="Prezime"  style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.korisnik.prezime}" />

                                            <h:outputText value="Zvanje" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.zvanje}" />

                                            <h:outputText value="Kabinet" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.kabinet}" />  

                                            <h:outputText value="Telefon" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.telefon}" />  

                                            <h:outputText value="Email" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.mail}" />  

                                            <h:outputText value="Adresa" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.adresa}" />  

                                            <h:outputText value="Sajt" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.web}" />

                                            <h:outputText value="Prima" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.prijem}" />

                                            <h:outputText value="Datum isteka ugovora" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.istekUgovora}" />

                                            <h:outputText value="Status" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.status}" />

                                            <h:outputText value="Biografija" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.cv}" />


                                        </h:panelGrid>
                                        <p:fieldset legend="Predmeti" toggleable="true" toggleSpeed="500" collapsed="true" >
                                            <p:ajax event="toggle" listener="#{tableZaposleni.loadPredmeti(zap)}" />
                                            <c:forEach items="#{tableZaposleni.predmetList}" var="pred">
                                                <h:panelGrid columns="2" cellpadding="10">
                                                    <h:outputText value="#{pred.naziv}"/>
                                                    <p:commandButton icon="ui-icon-circle-plus" action="#{predmetInfo.loadPredmet(pred.sifra)}"/>
                                                </h:panelGrid>
                                            </c:forEach>
                                        </p:fieldset>
                                    </p:tab>
                                </c:forEach>
                            </p:tabView>
                        </p:tab>

                        <p:tab title="Istrazivaci" id="istr"> 
                            <p:tabView id="ist" dynamic="true" orientation="left" effect="blind">
                                <c:forEach items="#{tableZaposleni.istrazivaci}" var="zap">
                                    <p:tab title="#{zap.korisnik.ime} #{zap.korisnik.prezime}">
                                        <h:panelGrid columns="2" cellpadding="4">  

                                            <f:facet name="header">  
                                                <p:graphicImage value="/resources/images/ff.jpg"/>  
                                            </f:facet>  

                                            <h:outputText value="Ime" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.korisnik.ime}" />

                                            <h:outputText value="Prezime"  style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.korisnik.prezime}" />

                                            <h:outputText value="Zvanje" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.zvanje}" />

                                            <h:outputText value="Kabinet" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.kabinet}" />  

                                            <h:outputText value="Telefon" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.telefon}" />  

                                            <h:outputText value="Email" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.mail}" />  

                                            <h:outputText value="Adresa" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.adresa}" />  

                                            <h:outputText value="Sajt" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.web}" />

                                            <h:outputText value="Prima" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.prijem}" />

                                            <h:outputText value="Datum isteka ugovora" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.istekUgovora}" />

                                            <h:outputText value="Status" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.status}" />

                                            <h:outputText value="Biografija" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.cv}" />


                                        </h:panelGrid>
                                        <p:fieldset legend="Predmeti" toggleable="true" toggleSpeed="500" collapsed="true" >
                                            <p:ajax event="toggle" listener="#{tableZaposleni.loadPredmeti(zap)}" />
                                            <c:forEach items="#{tableZaposleni.predmetList}" var="pred">
                                                <h:panelGrid columns="2" cellpadding="10">
                                                    <h:outputText value="#{pred.naziv}"/>
                                                    <p:commandButton icon="ui-icon-circle-plus" action="#{predmetInfo.loadPredmet(pred.sifra)}"/>
                                                </h:panelGrid>
                                            </c:forEach>
                                        </p:fieldset>
                                    </p:tab>
                                </c:forEach>
                            </p:tabView>
                        </p:tab>

                        <p:tab title="Ostali" id="ostali" > 
                            <p:tabView id="ost" dynamic="true" orientation="left" effect="blind">
                                <c:forEach items="#{tableZaposleni.ostaliMucenici}" var="zap">
                                    <p:tab title="#{zap.korisnik.ime} #{zap.korisnik.prezime}">
                                        <h:panelGrid columns="2" cellpadding="4">  

                                            <f:facet name="header">  
                                                <p:graphicImage value="/resources/images/ff.jpg"/>  
                                            </f:facet>  

                                            <h:outputText value="Ime" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.korisnik.ime}" />

                                            <h:outputText value="Prezime"  style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.korisnik.prezime}" />

                                            <h:outputText value="Zvanje" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.zvanje}" />

                                            <h:outputText value="Kabinet" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.kabinet}" />  

                                            <h:outputText value="Telefon" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.telefon}" />  

                                            <h:outputText value="Email" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.mail}" />  

                                            <h:outputText value="Adresa" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.adresa}" />  

                                            <h:outputText value="Sajt" style="font-weight:bold"/>  
                                            <h:outputText value="#{zapi.webSajt}" />

                                            <h:outputText value="Prima" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.prijem}" />

                                            <h:outputText value="Datum isteka ugovora" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.istekUgovora}" />

                                            <h:outputText value="Status" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.status}" />

                                            <h:outputText value="Biografija" style="font-weight:bold"/>  
                                            <h:outputText value="#{zap.cv}" />


                                        </h:panelGrid>
                                        <p:fieldset legend="Predmeti" toggleable="true" toggleSpeed="500" collapsed="true" >
                                            <p:ajax event="toggle" listener="#{tableZaposleni.loadPredmeti(zap)}" />
                                            <c:forEach items="#{tableZaposleni.predmetList}" var="pred">
                                                <h:panelGrid columns="2" cellpadding="10">
                                                    <h:outputText value="#{pred.naziv}"/>
                                                    <p:commandButton icon="ui-icon-circle-plus" action="#{predmetInfo.loadPredmet(pred.sifra)}"/>
                                                </h:panelGrid>
                                            </c:forEach>
                                        </p:fieldset>
                                    </p:tab>
                                </c:forEach>
                            </p:tabView>
                        </p:tab>		

                    </p:tabView>


                </h:form> 


            </ui:define>
        </ui:composition>
    </h:body>
</html>

